<template>
	<view>
		<image src="../../static/blue_control_bg.png" style="width: 100%;height: 25vh;"></image>

		<scroll-view scroll-y="true" style="width: 100%;height: 74.2vh;">
			<view class="grid-bg">
				<view class="grid-item-bg" v-for="(item, index) in controlList" :key="index"
					@click="onClickItem(item, index)">
					<image :src="item.icon" style="width: 68px;height: 68px;"></image>
					<text style="margin-top: 12px;font-size: 15px;color: #333333;">{{item.name}}</text>
				</view>
			</view>
		</scroll-view>

		<view v-if="isPop" class="mask">
			<view class="content">
				<view
					style="width: 100%;display: flex;flex-direction: row;align-items: center;justify-content: center;margin-top: 10px;margin-bottom: 15px;">
					<text style="color: #2697F9;font-size: 18px;position: absolute;left: 10%;">{{selectName}}</text>
					<text v-if="selectName == controlList[2].name"
						style="font-size: 15px;color: #000;">{{ymdate}}</text>

					<button v-if="selectName == controlList[12].name"
						style="height: 60rpx;font-size: 20rpx;display: flex;justify-content: center;align-items: center;"
						@click="Automatic">自动查询</button>

					<image src="../../static/close.png" style="width: 25px;height: 25px;position: absolute;right: 10%;"
						@click="diamiss"></image>

				</view>

				<view v-if="selectName == controlList[0].name">

					<radio-group @change="changWorkingMode"
						style="display: flex;justify-content:space-between;align-items: center;margin: 10px;">
						<label v-for="item in radioGroupWorkingMode" :key="item"
							style="display: flex;justify-content: flex-end;align-items: center">
							<radio :value="item" :checked="item==activeRadioWorkingMode" />{{item}}
						</label>
					</radio-group>


					<view v-if="activeRadioWorkingMode == '测量模式'">
						<view class="view" style="align-items: center;height: 30px;">
							<text class="title2">测量模式</text>

							<view class="radio">
								<view class="defa" :class="{'active': rSelect.indexOf(index)!=-1}"
									v-for="(value,index) in celiangArr" :key="index" @tap="tapInfo(index)">
									{{value.name}}
								</view>
							</view>

						</view>
					</view>

					<view v-if="activeRadioWorkingMode == '采样间隔'">
						<view class="view" style="height: 30px;">
							<text class="title2">采样间隔</text>

							<view class="input-view">
								<input class="input-center" type="number" @input="inputchange($event, '采样间隔')"
									placeholder="请输入" v-model="caiyangjiange" />
							</view>

							<text class="title2" style="right: 12%;">秒</text>
						</view>
					</view>




					<!-- <view class="moshi">
						<text style="font-size: 15px;margin-left: 10px;">传输模式</text>
						<view class="deom-flex">
							<view class="defa" :class="{'active': rSelect1.indexOf(index)!=-1}"
								v-for="(value,index) in chuanshuArr" :key="index" @tap="tapInfo1(index)">
								{{value.name}}
							</view>
						</view>
					</view> -->
				</view>

				<view v-if="selectName == controlList[1].name" style="padding-bottom: 10px;">
					<button class="button" @click="probeControl('R')">探头上升</button>
					<button class="button" @click="probeControl('F')">探头下降</button>
					<button class="button" @click="probeControl('S')">探头停止</button>
					<button class="button" @click="probeControl('M')">水位测量</button>
					<button class="button" @click="probeControl('Z')">测量校准</button>
				</view>

				<view v-if="selectName == controlList[2].name">
					<picker-view class="picker-modal-time" indicator-class="picker-modal-time-item" :value="timeValue"
						@change="onTimeChange">
						<picker-view-column>
							<view v-for="(v,i) in 24" :key="i">{{i<10?'0'+i:i}}时</view>
						</picker-view-column>
						<picker-view-column>
							<view v-for="(v,i) in 60" :key="i">{{i<10?'0'+i:i}}分</view>
						</picker-view-column>
						<picker-view-column>
							<view v-for="(v,i) in 60" :key="i">{{i<10?'0'+i:i}}秒</view>
						</picker-view-column>
					</picker-view>
				</view>

				<view v-if="selectName == controlList[3].name">
					<radio-group @change="chang"
						style="display: flex;justify-content:space-between;align-items: center;margin: 10px;">
						<label v-for="item in radioGroup" :key="item"
							style="display: flex;font-size: 12px;justify-content: flex-end;align-items: center">
							<radio :value="item" :checked="item==activeRadio" />{{item}}
						</label>
					</radio-group>

					<view v-if="activeRadio == '定时报文'">
						<view class="view" v-for="item in zibaozhouqi" v-if="item.name != '实时模式'">
							<text class="title2">{{item.name}}</text>
							<view class="input-view">
								<input class="input-center" type="number" @input="inputchange($event, item.name)"
									placeholder="请输入" v-model="item.value" />
							</view>
							<text class="title2" style="right: 12%;">{{item.unit}}</text>
						</view>
					</view>

					<view v-if="activeRadio == '加报报文'">
						<view class="view" v-for="item in jiabaofazhi">
							<text class="title2">{{item.name}}</text>
							<view class="input-view">
								<input class="input-center" type="number" @input="inputchange($event, item.name)"
									placeholder="请输入" v-model="item.value" />
							</view>

							<text class="title2" style="right: 12%;">{{item.unit}}</text>
						</view>
					</view>

					<view v-if="activeRadio == '维持报文'">
						<view class="view">
							<text class="title2">维持报文</text>
							<view class="input-view">
								<input class="input-center" type="number" @input="inputchange($event, '维持报文')"
									placeholder="请输入" v-model="xintiaojiange" />
							</view>
							<text class="title2" style="right: 12%;">秒</text>
						</view>
					</view>
				</view>

				<view v-if="selectName == controlList[4].name">
					<view class="view" v-for="item in shuiweixiuzheng">
							<text class="title2">{{item.name}}</text>
							<view class="input-view">
								<input class="input-center" type="digit"
									:placeholder="item.placeholder" @input="inputchange($event, item.name)"
									v-model="item.value" :disabled="item.disabled" />
							</view>

							<text class="title2" style="right: 12%;">{{item.unit}}</text>

					</view>
				</view>

				<view v-if="selectName == controlList[5].name">
					<view class="view">
						<text class="title2">测管长度</text>
						<view class="input-view">
							<input class="input-center" type="digit" @input="inputchange($event, '测井深度')"
								placeholder="请输入" v-model="cejingshendu" />
						</view>

						<text class="title2" style="right: 12%;">米</text>
					</view>
				</view>

				<view v-if="selectName == controlList[6].name">
					<view class="view">
						<text class="title2">测站高程</text>
						<view class="input-view">
							<input class="input-center" type="digit" @input="inputchange($event, '测站高程')"
								placeholder="请输入" v-model="cezhangaocheng" />
						</view>

						<text class="title2" style="right: 12%;">米</text>
					</view>
				</view>

				<view v-if="selectName == controlList[7].name">
					<view class="view">
						<text class="title2">测站编号</text>
						<view class="input-view">
							<input class="input-center" type="text" @input="inputchange($event, '测站编号')"
								placeholder="请输入" v-model="cezhanbianhao" />
						</view>

					</view>
				</view>

				<view v-if="selectName == controlList[8].name">
					<radio-group @change="changWired"
						style="display: flex;justify-content:space-between;align-items: center;margin: 10px;">
						<label v-for="item in radioGroupWired" :key="item"
							style="display: flex;font-size: 12px;justify-content: flex-end;align-items: center">
							<radio :value="item" :checked="item==activeRadioWired" />{{item}}
						</label>
					</radio-group>

					<view v-if="activeRadioWired == '无线网'">
						<view class="moshi">
							<text style="font-size: 15px;margin-left: 10px;">链路编号</text>
							<view class="deom-flex">
								<view class="defa" style="width: 55px;"
									:class="{'active': lianlubianhao.indexOf(index)!=-1}"
									v-for="(value,index) in lianluArr" :key="index" @tap="lianluTapInfo(index)">
									{{value.name}}
								</view>
							</view>
						</view>

						<view v-if="lianlubianhao[0] == 0">
							<view class="view" v-for="item in lianlu1">
								<text class="title">{{item.name}}</text>
								<input class="input" type="text" @input="inputchange($event, item.name+'一')"
									placeholder="请输入" v-model="item.value" />
							</view>

							<view class="view" style="align-items: center;height: 30px;">
								<text class="title2">使能开关</text>
								<view class="radio">
									<view class="defa" :class="{'active': onOff1.indexOf(index)!=-1}"
										v-for="(value,index) in onOffArr" :key="index" @tap="onOffTapInfo(index,'一')">
										{{value.name}}
									</view>
								</view>
							</view>
						</view>

						<view v-if="lianlubianhao[0] == 1">
							<view class="view" v-for="item in lianlu2">
								<text class="title">{{item.name}}</text>
								<input class="input" type="text" @input="inputchange($event, item.name+'二')"
									placeholder="请输入" v-model="item.value" />
							</view>

							<view class="view" style="align-items: center;height: 30px;">
								<text class="title2">使能开关</text>
								<view class="radio">
									<view class="defa" :class="{'active': onOff2.indexOf(index)!=-1}"
										v-for="(value,index) in onOffArr" :key="index" @tap="onOffTapInfo(index,'二')">
										{{value.name}}
									</view>
								</view>
							</view>
						</view>

						<view v-if="lianlubianhao[0] == 2">
							<view class="view" v-for="item in lianlu3">
								<text class="title">{{item.name}}</text>
								<input class="input" type="text" @input="inputchange($event, item.name+'三')"
									placeholder="请输入" v-model="item.value" />
							</view>

							<view class="view" style="align-items: center;height: 30px;">
								<text class="title2">使能开关</text>
								<view class="radio">
									<view class="defa" :class="{'active': onOff3.indexOf(index)!=-1}"
										v-for="(value,index) in onOffArr" :key="index" @tap="onOffTapInfo(index,'三')">
										{{value.name}}
									</view>
								</view>
							</view>
						</view>
					</view>

					<view v-if="activeRadioWired == '有线网'">
						<view class="moshi">
							<text style="font-size: 15px;margin-left: 10px;">链路编号</text>
							<view class="deom-flex">
								<view class="defa" style="width: 55px;"
									:class="{'active': lianlubianhaoWired.indexOf(index)!=-1}"
									v-for="(value,index) in lianluArr" :key="index" @tap="lianluTapInfoWired(index)">
									{{value.name}}
								</view>
							</view>
						</view>

						<view v-if="lianlubianhaoWired[0] == 0">
							<view class="view" v-for="item in lianlu1Wired">
								<text class="title">{{item.name}}</text>
								<input class="input" type="text" @input="inputchange($event, item.name+'一')"
									placeholder="请输入" v-model="item.value" />
							</view>

							<view class="view" style="align-items: center;height: 30px;">
								<text class="title2">使能开关</text>
								<view class="radio">
									<view class="defa" :class="{'active': onOff1Wired.indexOf(index)!=-1}"
										v-for="(value,index) in onOffArr" :key="index"
										@tap="onOffTapInfo(index,'一Wired')">
										{{value.name}}
									</view>
								</view>
							</view>
						</view>

						<view v-if="lianlubianhaoWired[0] == 1">
							<view class="view" v-for="item in lianlu2Wired">
								<text class="title">{{item.name}}</text>
								<input class="input" type="text" @input="inputchange($event, item.name+'二')"
									placeholder="请输入" v-model="item.value" />
							</view>

							<view class="view" style="align-items: center;height: 30px;">
								<text class="title2">使能开关</text>
								<view class="radio">
									<view class="defa" :class="{'active': onOff2Wired.indexOf(index)!=-1}"
										v-for="(value,index) in onOffArr" :key="index"
										@tap="onOffTapInfo(index,'二Wired')">
										{{value.name}}
									</view>
								</view>
							</view>
						</view>

						<view v-if="lianlubianhaoWired[0] == 2">
							<view class="view" v-for="item in lianlu3Wired">
								<text class="title">{{item.name}}</text>
								<input class="input" type="text" @input="inputchange($event, item.name+'三')"
									placeholder="请输入" v-model="item.value" />
							</view>

							<view class="view" style="align-items: center;height: 30px;">
								<text class="title2">使能开关</text>
								<view class="radio">
									<view class="defa" :class="{'active': onOff3Wired.indexOf(index)!=-1}"
										v-for="(value,index) in onOffArr" :key="index"
										@tap="onOffTapInfo(index,'三Wired')">
										{{value.name}}
									</view>
								</view>
							</view>
						</view>
					</view>

					<view v-if="activeRadioWired == '中心站'">
						<view class="view" v-for="item in zhongxinzhanhao">
							<text class="title2">{{item.name}}</text>
							<view class="input-view">
								<input class="input-center" type="number" @input="inputchange($event, '中心站')"
									placeholder="请输入" v-model="item.value" />
							</view>

						</view>
					</view>
				</view>

				<view v-if="selectName == controlList[9].name">
					<view class="moshi">
						<text class="title2">开箱报警</text>
						<view class="radio">
							<view class="defa" :class="{'active': kaixiangOff.indexOf(index)!=-1}"
								v-for="(value,index) in onOffArr" :key="index" @tap="onOffTapInfo(index,'开箱')">
								{{value.name}}
							</view>
						</view>
					</view>

					<view class="moshi">
						<text class="title2">拆除报警</text>
						<view class="radio">
							<view class="defa" :class="{'active': chaichuOff.indexOf(index)!=-1}"
								v-for="(value,index) in onOffArr" :key="index" @tap="onOffTapInfo(index,'拆除')">
								{{value.name}}
							</view>
						</view>
					</view>
				</view>

				<view v-if="selectName == controlList[10].name">
					<view class="view" v-for="item in wangkacanshu">
						<text class="title2">{{item.name}}</text>
						<view class="input-view">
							<input class="input-center" :placeholder="item.placeholder" v-model="item.value"
								:disabled="item.disabled" />
						</view>

					</view>
				</view>

				<view v-if="selectName == controlList[11].name">
					<view style="margin-top: 15px;display: flex;flex-direction: column;">
						<text style="margin-left: 5px;">数据接收</text>
						<text
							style="width: 100%;height: 100px;border: 1px solid #2697F9;margin-top: 5px;	word-break:break-all;word-wrap:break-word;">{{setMLKZ}}</text>
						<text style="margin-top: 15px;margin-left: 5px;">数据发送</text>
						<input class="input" style="width: 100%;height: 50px;border: 1px solid #2697F9;margin-top: 5px;"
							placeholder="请输入" v-model="enquiriesMLKZ" />
					</view>
				</view>

				<view v-if="selectName == controlList[12].name">
					<view class="view">
						<text class="title2">有效状态</text>
						<view class="input-view">
							<input class="input-center" @input="inputchange($event, '有效状态')" placeholder="--"
								v-model="shuiweistatus" disabled="false" />
						</view>

						<!-- <view class="deom-flex">
							<view class="defa" :class="{'active': status.indexOf(index)!=-1}"
								v-for="(value,index) in statusArr" :key="index" @tap="onOffTapInfo(index,'有效无效')">
								{{value.name}}
							</view>
						</view> -->
					</view>
					<view class="view">
						<text class="title2">水位测值</text>
						<view class="input-view">
							<input class="input-center" @input="inputchange($event, '水位测值')" placeholder="--"
								v-model="shuiweicezhi" disabled="false" />
						</view>

						<text class="title2" style="right: 12%;">米</text>
					</view>
				</view>

				<view v-if="selectName == controlList[13].name">
					<view class="view" v-for="item in tantouzhaungtai">
						<text class="title2">{{item.name}}</text>
						<view class="input-view">
							<input class="input-center" placeholder="--" v-model="item.value" disabled="false" />
						</view>

					</view>
				</view>

				<view v-if="selectName == controlList[14].name">
					<radio-group @change="tongxinChang"
						style="display: flex;justify-content:space-between;align-items: center;margin: 10px;">
						<label v-for="item in radioGroupTongxin" :key="item"
							style="display: flex;justify-content: flex-end;align-items: center">
							<radio :value="item" :checked="item==activeRadioTongxin" />{{item}}
						</label>
					</radio-group>

					<view v-if="activeRadioTongxin == '无线网状态'">
						<view class="view" v-for="item in tongxinzhaungtai">
							<text class="title2">{{item.name}}</text>
							<view class="input-view">
								<input class="input-center" placeholder="--" v-model="item.value" disabled="false" />
							</view>

						</view>
					</view>

					<view v-if="activeRadioTongxin == '有线网状态'">
						<view class="view" v-for="item in youxiantongxinzhaungtai">
							<text class="title2">{{item.name}}</text>
							<view class="input-view">
								<input class="input-center" placeholder="--" v-model="item.value" disabled="false" />
							</view>

						</view>
					</view>

				</view>

				<!-- <view v-if="selectName == controlList[15].name">
					<view class="view">
						<text class="title">信号强度</text>
						<input class="input" placeholder="--" v-model="xinhaoqiangdu" disabled="false" />
						<text class="title1">-dBm</text>
					</view>
				</view> -->

				<view v-if="selectName == controlList[15].name">
					<view class="view">
						<text class="title2">SIM卡号</text>
						<view class="input-view">
							<input class="input-center" placeholder="--" v-model="simKaHao" disabled="false" />
						</view>

					</view>
				</view>

				<view v-if="selectName == controlList[16].name">
					<view class="view">
						<text class="title2">供电电压</text>
						<view class="input-view">
							<input class="input-center" placeholder="--" v-model="dianchidianya" disabled="false" />
						</view>

						<!-- <view style="display: flex;flex: 1;"></view> -->
						<text class="title2" style="right: 12%;">V</text>
					</view>
				</view>

				<!-- <view v-if="selectName == controlList[18].name">
					<view class="view" v-for="item in wenshiduzhi">
						<text class="title">{{item.name}}</text>
						<input class="input" placeholder="--" v-model="item.value" disabled="false" />
						<text class="title1">{{item.unit}}</text>
					</view>
				</view>

				<view v-if="selectName == controlList[19].name">
					<view class="view">
						<text class="title">存储状态</text>
						<input class="input" placeholder="--" v-model="cunchuzhaungtai" disabled="false" />
					</view>
				</view> -->

				<view v-if="selectName == controlList[17].name">
					<view class="view" v-for="item in fangdaozhaungtai">
						<text class="title2">{{item.name}}</text>
						<view class="input-view">
							<input class="input-center" placeholder="--" v-model="item.value" disabled="false" />
						</view>

					</view>
				</view>

				<!-- <view v-if="selectName == controlList[21].name">
					<view class="view">
						<text class="title">自检周期</text>
						<input class="input" placeholder="--" v-model="zijianzhouqi" disabled="false" />
						<text class="title1">月</text>
					</view>
				</view> -->

				<view v-if="selectName == controlList[18].name">
					<view class="view">
						<text class="title2">固件版本</text>
						<view class="input-view">
							<input class="input-center" placeholder="--" v-model="gujianbanben" disabled="false" />
						</view>

					</view>
				</view>

				<view v-if="selectName == controlList[19].name">
					<view class="view">
						<text class="title2">设备编号</text>
						<view class="input-view">
							<input class="input-center" placeholder="--" v-model="chanpinbianhao" disabled="false" />
						</view>

					</view>
				</view>

				<view v-if="selectName != controlList[1].name"
					style="display: flex; flex-direction: row;margin-top: 20px;">
					<view v-if="selectName != controlList[11].name" @click.stop="Enquiries(selectName)"
						style="width: 100px;height: 35px;border: 1px solid #2697F9;color: #2697F9;border-radius: 20px;display: flex;justify-content: center;align-items: center;">
						查询</view>
					<view style="flex: 1;"></view>
					<view @click.stop="SetData(selectName)"
						style="width: 100px;height: 35px;border: 1px solid #2697F9;color: white;background-color: #2697F9;border-radius: 20px;display: flex;justify-content: center;align-items: center;margin-right: 5px;">
						{{buttonType}}
					</view>
				</view>
			</view>
		</view>

		<suspended></suspended>

	</view>
</template>

<script>
	import {
		EnquirieswriteBLECharacteristicValue,
		SetwriteBLECharacteristicValue,
		hexCharCodeToStr,
		ab2hex,
		result1,
		result2,
		result3,
		result4,
		getOnOff,
		getTongXin,
		getZhuangtai
	} from '../../comment/dataUtils.js'

	export default {
		data() {
			return {
				buttonType: '设置',
				duration: 1500,
				controlList: [{
						icon: '/static/blue_function_icon6.png',
						name: '工作模式'
					},
					{
						icon: '/static/blue_function_icon13.png',
						name: '设备调试'
					},
					{
						icon: '/static/blue_function_icon11.png',
						name: '日期时间'
					},
					{
						icon: '/static/blue_function_icon7.png',
						name: '报文周期'
					},
					{
						icon: '/static/blue_function_icon18.png',
						name: '水位修正'
					},
					{
						icon: '/static/blue_function_icon9.png',
						name: '测管长度'
					},
					{
						icon: '/static/blue_function_icon8.png',
						name: '测站高程'
					},
					{
						icon: '/static/blue_function_icon12.png',
						name: '测站编号'
					},
					{
						icon: '/static/blue_function_icon2.png',
						name: '通信地址'
					},
					{
						icon: '/static/blue_function_icon19.png',
						name: '报警检测'
					},
					{
						icon: '/static/wangkacanshu.png',
						name: '网卡参数'
					},
					{
						icon: '/static/blue_function_icon20.png',
						name: '配置扩展'
					},
					{
						icon: '/static/blue_function_icon21.png',
						name: '水位测值'
					},
					{
						icon: '/static/blue_function_icon22.png',
						name: '探头状态'
					},
					{
						icon: '/static/blue_function_icon27.png',
						name: '通信状态'
					},
					// {
					// 	icon: '/static/blue_function_icon25.png',
					// 	name: '信号强度'
					// },
					{
						icon: '/static/blue_function_icon26.png',
						name: 'SIM卡号'
					},
					{
						icon: '/static/blue_function_icon23.png',
						name: '供电电压'
					},
					// {
					// 	icon: '/static/blue_function_icon24.png',
					// 	name: '温湿度值'
					// },
					// {
					// 	icon: '/static/blue_function_icon28.png',
					// 	name: '存储状态'
					// },
					{
						icon: '/static/blue_function_icon29.png',
						name: '报警状态'
					},
					// {
					// 	icon: '/static/blue_function_icon30.png',
					// 	name: '自检周期'
					// },
					{
						icon: '/static/blue_function_icon31.png',
						name: '固件版本'
					},
					{
						icon: '/static/blue_function_icon1.png',
						name: '设备编号'
					}
				],
				NAME: {
					工作模式: '工作模式',
					探头控制: '探头控制',
					日期时间: '日期时间',
					报文周期: '报文周期',
					测井深度: '测管长度',
					水位修正: '水位修正',
					测站高程: '测站高程',
					测站编号: '测站编号',
					通信地址: '通信地址',
					报警检测: '报警检测',
					测管级联: '网卡参数',
					命令扩展: '配置扩展',
					水位测值: '水位测值',
					探头状态: '探头状态',
					通信状态: '通信状态',
					信号强度: '信号强度',
					SIM卡号: 'SIM卡号',
					电池电压: '供电电压',
					温湿度值: '温湿度值',
					存储状态: '存储状态',
					防盗状态: '报警状态',
					自检周期: '自检周期',
					固件版本: '固件版本',
					产品编号: '设备编号'
				},
				timeValue: [], //现在时间
				date: new Date().toISOString(), //现在时间
				ymdate: '',
				selectName: '66',
				isPop: false,
				celiangArr: [{
						name: "调试"
					},
					{
						name: "正常"
					},
					{
						name: "其他"
					} 
				],
				chuanshuArr: [{
					name: "应答"
				}, {
					name: "无应答"
				}],
				rSelect: [],
				rSelect1: [],
				sendDataName: '',
				// 报文周期单选框数据
				activeRadio: '定时报文', //存的是单选按钮选中的value值
				radioGroup: ['定时报文', '加报报文', '维持报文'],
				activeRadioWired: '无线网',
				radioGroupWired: ['无线网', '有线网', '中心站'],
				activeRadioWorkingMode: '测量模式',
				radioGroupWorkingMode: ['测量模式', '采样间隔'],
				zibaozhouqi: [{
					name: "实时模式",
					value: '',
					unit: '秒'
				}, {
					name: "调试模式",
					value: '',
					unit: '秒'
				}, {
					name: "正常模式",
					value: '',
					unit: '小时'
				}],

				jiabaofazhi: [{
					name: "加报间隔",
					value: '',
					unit: '分钟'
				}, {
					name: "加报变幅",
					value: '',
					unit: '毫米'
				}, {
					name: "加报测值",
					value: '',
					unit: '米'
				}],

				shuiweixiuzheng: [{
					name: "实际埋深",
					value: '',
					unit: '米',
					disabled: false,
					placeholder: '请输入'
				}, {
					name: "测量埋深",
					value: '',
					unit: '米',
					disabled: true,
					placeholder: '--'
				}, {
					name: "水位修正",
					value: '',
					unit: '米',
					disabled: true,
					placeholder: '--'
				}],
				cejingshendu: '',
				cezhangaocheng: '',
				cezhanbianhao: '',
				lianluArr: [{
					name: "1"
				}, {
					name: "2"
				}, {
					name: "3"
				}],
				lianlubianhao: [0],
				lianlubianhaoWired: [0],
				lianlu1: [{
					name: "服务器地址",
					value: '',
				}, {
					name: "服务端口号",
					value: '',
				}, {
					name: "接入点名称",
					value: '',
				}],
				lianlu2: [{
					name: "服务器地址",
					value: '',
				}, {
					name: "服务端口号",
					value: '',
				}, {
					name: "接入点名称",
					value: '',
				}],
				lianlu3: [{
					name: "服务器地址",
					value: '',
				}, {
					name: "服务端口号",
					value: '',
				}, {
					name: "接入点名称",
					value: '',
				}],

				lianlu1Wired: [{
					name: "服务器地址",
					value: '',
				}, {
					name: "服务端口号",
					value: '',
				}],
				lianlu2Wired: [{
					name: "服务器地址",
					value: '',
				}, {
					name: "服务端口号",
					value: '',
				}],
				lianlu3Wired: [{
					name: "服务器地址",
					value: '',
				}, {
					name: "服务端口号",
					value: '',
				}],
				onOffArr: [{
					name: "开"
				}, {
					name: "关"
				}, ],
				onOff1: [],
				onOff2: [],
				onOff3: [],
				onOff1Wired: [],
				onOff2Wired: [],
				onOff3Wired: [],
				kaixiangOff: [],
				chaichuOff: [],
				enquiriesMLKZ: '',
				setMLKZ: '',
				statusArr: [{
					name: "有效"
				}, {
					name: "无效"
				}],
				status: [],
				shuiweicezhi: '',
				tantouzhaungtai: [{
					name: "测点检测",
					value: '',
				}, {
					name: "运动状态",
					value: '',
				}, {
					name: "测点状态",
					value: '',
				}],
				activeRadioTongxin: '无线网状态',
				radioGroupTongxin: ['无线网状态', '有线网状态'],
				tongxinzhaungtai: [{
					name: "链路一",
					value: '',
				}, {
					name: "链路二",
					value: '',
				}, {
					name: "链路三",
					value: '',
				}],
				youxiantongxinzhaungtai: [{
					name: "链路一",
					value: '',
				}, {
					name: "链路二",
					value: '',
				}, {
					name: "链路三",
					value: '',
				}],
				xinhaoqiangdu: '',
				simKaHao: '',
				dianchidianya: '',
				wenshiduzhi: [{
					name: "机内温度",
					value: '',
					unit: '℃'
				}, {
					name: "机内湿度",
					value: '',
					unit: '%'
				}],
				cunchuzhaungtai: '',
				fangdaozhaungtai: [{
					name: "箱门状态",
					value: '',
				}, {
					name: "安装状态",
					value: '',
				}],
				zijianzhouqi: '',
				gujianbanben: '',
				chanpinbianhao: '',
				ceguanjilian: [{
					name: "编号",
					value: '',
					unit: ''
				}, {
					name: "测管级联",
					value: '',
					unit: 'mm'
				}],

				timer: null,

				wangkacanshu: [{
					name: "物理地址",
					value: '',
					disabled: true,
					placeholder: '--'
				}, {
					name: "本机地址",
					value: '',
					disabled: false,
					placeholder: '请输入'
				}, {
					name: "子网掩码",
					value: '',
					disabled: false,
					placeholder: '请输入'
				}, {
					name: "默认网关",
					value: '',
					disabled: false,
					placeholder: '请输入'
				}],

				caiyangjiange: '',
				xintiaojiange: '',
				zhongxinzhanhao: [{
					name: "链路一",
					value: '',
				}, {
					name: "链路二",
					value: '',
				}, {
					name: "链路三",
					value: '',
				}],
				shuiweistatus: ''
			};
		},

		onShow() {
			this.NoticeConnection()
		},

		onLoad() {
			this.setStorage()
		},

		onHide() {
			if (this.timer) { //注销定时器
				console.log('注销定时器')
				clearInterval(this.timer)
				this.timer = null;
			}
		},
		onUnload() {
			if (this.timer) { //注销定时器
				console.log('注销定时器')
				clearInterval(this.timer)
				this.timer = null;
			}
		},

		methods: {
			Automatic() {
				var that = this
				if (this.selectName == this.NAME.水位测值) {
					that.Enquiries(that.selectName)
					this.timer = setInterval(() => {
						that.EnquiriesListenMessage()
						that.sendDataName = getApp().globalData.writeMsg.WLV
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLV)
					}, 2000)
				}
			},

			setStorage() {
				if (uni.getStorageSync('TSN') != '') {
					this.cezhanbianhao = result1(uni.getStorageSync('TSN'))
				}

				if (uni.getStorageSync('MLKZ') != '') {
					this.enquiriesMLKZ = uni.getStorageSync('MLKZ')
				}

				if (uni.getStorageSync('LTE') != '') {
					var split = uni.getStorageSync('LTE').split(";")
					this.onOff1 = []
					this.onOff2 = []
					this.onOff3 = []
					if (result1(split[0]) == 'O') {
						this.onOff1.push(0);
					} else if (result1(split[0]) == 'C') {
						this.onOff1.push(1);
					}

					if (result1(split[1]) == 'O') {
						this.onOff2.push(0);
					} else if (result1(split[1]) == 'C') {
						this.onOff2.push(1);
					}

					if (result1(split[2]) == 'O') {
						this.onOff3.push(0);
					} else if (result1(split[2]) == 'C') {
						this.onOff3.push(1);
					}
					this.lianlu1[0].value = result2(split[0])
					this.lianlu1[1].value = result3(split[0])
					this.lianlu1[2].value = result4(split[0])
					this.lianlu2[0].value = result2(split[1])
					this.lianlu2[1].value = result3(split[1])
					this.lianlu2[2].value = result4(split[1])
					this.lianlu3[0].value = result2(split[2])
					this.lianlu3[1].value = result3(split[2])
					this.lianlu3[2].value = result4(split[2])
				}

				if (uni.getStorageSync('ETH') != '') {
					var split = uni.getStorageSync('ETH').split(";")
					this.onOff1Wired = []
					this.onOff2Wired = []
					this.onOff3Wired = []
					if (result1(split[0]) == 'O') {
						this.onOff1Wired.push(0);
					} else if (result1(split[0]) == 'C') {
						this.onOff1Wired.push(1);
					}

					if (result1(split[1]) == 'O') {
						this.onOff2Wired.push(0);
					} else if (result1(split[1]) == 'C') {
						this.onOff2Wired.push(1);
					}

					if (result1(split[2]) == 'O') {
						this.onOff3Wired.push(0);
					} else if (result1(split[2]) == 'C') {
						this.onOff3Wired.push(1);
					}
					this.lianlu1Wired[0].value = result2(split[0])
					this.lianlu1Wired[1].value = result3(split[0])
					this.lianlu2Wired[0].value = result2(split[1])
					this.lianlu2Wired[1].value = result3(split[1])
					this.lianlu3Wired[0].value = result2(split[2])
					this.lianlu3Wired[1].value = result3(split[2])
					console.log('3333333', uni.getStorageSync('ETH'))
				}

				if (uni.getStorageSync('CSN') != '') {
					var split = uni.getStorageSync('CSN').split(";")
					this.zhongxinzhanhao[0].value = result1(split[0])
					this.zhongxinzhanhao[1].value = result1(split[1])
					this.zhongxinzhanhao[2].value = result1(split[2])
				}
			},

			//查询
			Enquiries(name) {
				this.EnquiriesListenMessage()
				switch (name) {
					case this.NAME.工作模式:
						if (this.activeRadioWorkingMode == '测量模式') {
							this.sendDataName = getApp().globalData.writeMsg.MOD
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.MOD)
						} else if (this.activeRadioWorkingMode == '采样间隔') {
							this.sendDataName = getApp().globalData.writeMsg.GTC
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.GTC)
						}
						break;
					case this.NAME.日期时间:
						this.sendDataName = getApp().globalData.writeMsg.RTC
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.RTC)
						break;
					case this.NAME.报文周期:
						if (this.activeRadio == '定时报文') {
							this.sendDataName = getApp().globalData.writeMsg.UMC
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.UMC)
						} else if (this.activeRadio == '加报报文') {
							this.sendDataName = getApp().globalData.writeMsg.AMT
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.AMT)
						} else if (this.activeRadio == '维持报文') {
							this.sendDataName = getApp().globalData.writeMsg.BTC
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.BTC)
						}
						break;
					case this.NAME.水位修正:
						this.sendDataName = getApp().globalData.writeMsg.WLC
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLC)
						break;
					case this.NAME.测井深度:
						this.sendDataName = getApp().globalData.writeMsg.DLV
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DLV)
						break;
					case this.NAME.测站高程:
						this.sendDataName = getApp().globalData.writeMsg.WLR
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLR)
						break;
					case this.NAME.测站编号:
						this.sendDataName = getApp().globalData.writeMsg.TSN
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.TSN)
						break;
					case this.NAME.通信地址:
						switch (this.activeRadioWired) {
							case '无线网':
								this.sendDataName = getApp().globalData.writeMsg.LTE
								EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.LTE)
								break
							case '有线网':
								this.sendDataName = getApp().globalData.writeMsg.ETH
								EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.ETH)
								break
							case '中心站':
								this.sendDataName = getApp().globalData.writeMsg.CSN
								EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.CSN)
								break
						}
						break;
					case this.NAME.报警检测:
						this.sendDataName = getApp().globalData.writeMsg.DRA
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DRA)
						break;
						// case this.NAME.测管级联:
						// 	this.sendDataName = getApp().globalData.writeMsg.COH
						// 	EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.COH)
						// 	break;
					case this.NAME.水位测值:
						if (this.timer) { //注销定时器
							uni.showToast({
								title: '自动查询中...',
								icon: 'none'
							})
						}
						this.sendDataName = getApp().globalData.writeMsg.WLV
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLV)
						break;
					case this.NAME.探头状态:
						this.sendDataName = getApp().globalData.writeMsg.SEN
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SEN)
						break;
					case this.NAME.通信状态:
						switch (this.activeRadioTongxin) {
							case '无线网状态':
								this.sendDataName = getApp().globalData.writeMsg.WLL
								EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WLL)
								break
							case '有线网状态':
								this.sendDataName = getApp().globalData.writeMsg.WDL
								EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.WDL)
								break
						}
						break;
					case this.NAME.信号强度:
						this.sendDataName = getApp().globalData.writeMsg.CSQ
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.CSQ)
						break;
					case this.NAME.SIM卡号:
						this.sendDataName = getApp().globalData.writeMsg.SIM
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SIM)
						break;
					case this.NAME.电池电压:
						this.sendDataName = getApp().globalData.writeMsg.BAT
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.BAT)
						break;
					case this.NAME.温湿度值:
						this.sendDataName = getApp().globalData.writeMsg.TRH
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.TRH)
						break;
					case this.NAME.存储状态:
						this.sendDataName = getApp().globalData.writeMsg.EXM
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.EXM)
						break;
					case this.NAME.防盗状态:
						this.sendDataName = getApp().globalData.writeMsg.DRS
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.DRS)
						break;
					case this.NAME.自检周期:
						this.sendDataName = getApp().globalData.writeMsg.CTC
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.CTC)
						break;
					case this.NAME.固件版本:
						this.sendDataName = getApp().globalData.writeMsg.VER
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.VER)
						break;
					case this.NAME.产品编号:
						this.sendDataName = getApp().globalData.writeMsg.SID
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SID)
						break;
					case this.NAME.测管级联:
						this.sendDataName = getApp().globalData.writeMsg.IPC
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.IPC)
						break;
					default:
						break;
				}
			},

			//查询监听发送过来的消息
			EnquiriesListenMessage() {
				let that = this
				let result = ''
				uni.onBLECharacteristicValueChange((res) => {
					let resHex = ab2hex(res.value)
					result = hexCharCodeToStr(resHex)

					console.log('查询蓝牙返回的数据', result)
					switch (that.selectName) {
						case that.NAME.工作模式:

							if (this.activeRadioWorkingMode == '测量模式') {
								switch (result1(result)) {
									case 'S':
										that.tapInfo(1)
										break;
									case 'R':
										that.tapInfo(2)
										break;
									case 'M':
										that.tapInfo(0)
										break;
								}

								switch (result2(result)) {
									case 'A':
										that.tapInfo1(0)
										break;
									case 'N':
										that.tapInfo1(1)
										break;
								}
							} else if (this.activeRadioWorkingMode == '采样间隔') {
								this.caiyangjiange = result1(result)
							}

							break;

						case that.NAME.日期时间:
							that.timeValue = result2(result).replace(new RegExp(':', 'ig'), ',').split(',')
							that.ymdate = '20' + result1(result)
							break;

						case that.NAME.报文周期:
							this.$nextTick(() => {
								if (this.activeRadio == '定时报文') {
									that.zibaozhouqi[0].value = result2(result)
									that.zibaozhouqi[1].value = result3(result)
									that.zibaozhouqi[2].value = JSON.stringify(parseFloat(result1(
											result)) /
										3600)
								} else if (this.activeRadio == '加报报文') {
									that.jiabaofazhi[0].value = result1(result)
									that.jiabaofazhi[1].value = result2(result)
									that.jiabaofazhi[2].value = result3(result)
								} else if (this.activeRadio == '维持报文') {
									that.xintiaojiange = result1(result)
								}
							})
							break;

						case that.NAME.水位修正:
							if (that.sendDataName == getApp().globalData.writeMsg.WLC) {
								that.shuiweixiuzheng[2].value = result1(result)
							} else {
								that.shuiweixiuzheng[1].value = result1(result) 
							}
							console.log('-------------', that.shuiweixiuzheng)
							break;
						case that.NAME.测井深度:
							that.cejingshendu = result1(result)
							break;
						case that.NAME.测站高程:
							that.cezhangaocheng = result1(result)
							break;
						case that.NAME.测站编号:
							uni.setStorageSync('TSN', result)
							that.cezhanbianhao = result1(result)
							break;
						case that.NAME.通信地址:

							var split = result.split(";")
							switch (this.activeRadioWired) {
								case '无线网':
									uni.setStorageSync('LTE', result)
									this.onOff1 = []
									this.onOff2 = []
									this.onOff3 = []
									if (result1(split[0]) == 'O') {
										this.onOff1.push(0);
									} else if (result1(split[0]) == 'C') {
										this.onOff1.push(1);
									}

									if (result1(split[1]) == 'O') {
										this.onOff2.push(0);
									} else if (result1(split[1]) == 'C') {
										this.onOff2.push(1);
									}

									if (result1(split[2]) == 'O') {
										this.onOff3.push(0);
									} else if (result1(split[2]) == 'C') {
										this.onOff3.push(1);
									}
									that.lianlu1[0].value = result2(split[0])
									that.lianlu1[1].value = result3(split[0])
									that.lianlu1[2].value = result4(split[0])
									that.lianlu2[0].value = result2(split[1])
									that.lianlu2[1].value = result3(split[1])
									that.lianlu2[2].value = result4(split[1])
									that.lianlu3[0].value = result2(split[2])
									that.lianlu3[1].value = result3(split[2])
									that.lianlu3[2].value = result4(split[2])
									break
								case '有线网':
									uni.setStorageSync('ETH', result)
									this.onOff1Wired = []
									this.onOff2Wired = []
									this.onOff3Wired = []
									if (result1(split[0]) == 'O') {
										this.onOff1Wired.push(0);
									} else if (result1(split[0]) == 'C') {
										this.onOff1Wired.push(1);
									}

									if (result1(split[1]) == 'O') {
										this.onOff2Wired.push(0);
									} else if (result1(split[1]) == 'C') {
										this.onOff2Wired.push(1);
									}

									if (result1(split[2]) == 'O') {
										this.onOff3Wired.push(0);
									} else if (result1(split[2]) == 'C') {
										this.onOff3Wired.push(1);
									}
									that.lianlu1Wired[0].value = result2(split[0])
									that.lianlu1Wired[1].value = result3(split[0])
									that.lianlu2Wired[0].value = result2(split[1])
									that.lianlu2Wired[1].value = result3(split[1])
									that.lianlu3Wired[0].value = result2(split[2])
									that.lianlu3Wired[1].value = result3(split[2])
									break
								case '中心站':
									uni.setStorageSync('CSN', result)
									that.zhongxinzhanhao[0].value = result1(split[0])
									that.zhongxinzhanhao[1].value = result1(split[1])
									that.zhongxinzhanhao[2].value = result1(split[2])
									break
							}
							console.log('222222', split)
							break;
						case that.NAME.报警检测:
							if (that.sendDataName == getApp().globalData.writeMsg.DRA) {
								that.kaixiangOff = []
								if (result1(result) == 'O') {
									this.kaixiangOff.push(0);
								} else if (result1(result) == 'C') {
									this.kaixiangOff.push(1);
								}
							} else {
								that.chaichuOff = []
								if (result1(result) == 'O') {
									this.chaichuOff.push(0);
								} else if (result1(result) == 'C') {
									this.chaichuOff.push(1);
								}
							}
							break;
						case that.NAME.命令扩展:
							that.setMLKZ = result
							//uni.setStorageSync('MLKZ', result)
							break;
						case that.NAME.水位测值:
							that.shuiweicezhi = result1(result)
							that.status = []
							switch (result2(result)) {
								case 'A':
									that.status.push(0)
									that.shuiweistatus = '有效'
									break
								case 'V':
									that.status.push(1)
									that.shuiweistatus = '无效'
									break
							}
							break;
						case that.NAME.探头状态:
							that.tantouzhaungtai[0].value = result1(result)
							that.tantouzhaungtai[1].value = getZhuangtai(result2(result))
							switch (result3(result)) {
								case 'O':
									that.tantouzhaungtai[2].value = '正常'
									break
								case 'E':
								case 'F':
								case 'G':
									that.tantouzhaungtai[2].value = '异常'
									break
							}
							break;
						case that.NAME.通信状态:
							var split = result.split(';')
							switch (that.activeRadioTongxin) {
								case '无线网状态':
									that.tongxinzhaungtai[0].value = getTongXin(result1(split[0]))
									that.tongxinzhaungtai[1].value = getTongXin(result1(split[1]))
									that.tongxinzhaungtai[2].value = getTongXin(result1(split[2]))
									break
								case '有线网状态':
									that.youxiantongxinzhaungtai[0].value = getTongXin(result1(split[0]))
									that.youxiantongxinzhaungtai[1].value = getTongXin(result1(split[1]))
									that.youxiantongxinzhaungtai[2].value = getTongXin(result1(split[2]))
									break
							}

							break;
						case that.NAME.信号强度:
							that.xinhaoqiangdu = result1(result)
							break;
						case that.NAME.SIM卡号:
							that.simKaHao = result1(result)
							break;
						case that.NAME.电池电压:
							that.dianchidianya = result1(result)
							break;
						case that.NAME.温湿度值:
							that.wenshiduzhi[0].value = result1(result)
							that.wenshiduzhi[1].value = result2(result)
							break;
						case that.NAME.存储状态:
							if (result1(result) == '0' || result1(result) == 'EF4015') {
								that.cunchuzhaungtai = '正常'
							} else {
								that.cunchuzhaungtai = '异常'
							}
							break;
						case that.NAME.防盗状态:
							if (that.sendDataName == getApp().globalData.writeMsg.DRS) {
								that.fangdaozhaungtai[0].value = getOnOff(result1(result))
							} else {
								that.fangdaozhaungtai[1].value = getOnOff(result1(result))
							}
							break;
						case that.NAME.自检周期:
							that.zijianzhouqi = result1(result)
							break
						case that.NAME.固件版本:
							that.gujianbanben = result1(result)
							break
						case that.NAME.产品编号:
							that.chanpinbianhao = result1(result)
							break
						case that.NAME.测管级联:
							var split = result.replace(/\s+/g, '').split(";")
							that.wangkacanshu[0].value = split[0].split(",")[1]
							that.wangkacanshu[1].value = split[1].split(",")[1]
							that.wangkacanshu[2].value = split[2].split(",")[1]
							that.wangkacanshu[3].value = split[3].split(",")[1]
							break
						default:
							break;
					}



					if (that.timer == null) {
						// if (that.sendDataName != '' && that.selectName != that.NAME.命令扩展) {
						// 	if (result.indexOf(that.sendDataName) != -1) {
						uni.showToast({
							title: '查询成功',
							icon: 'success',
							duration: 1500
						})

						if (that.sendDataName == getApp().globalData.writeMsg.WLC) {
							that.sendDataName = ''
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.LIN)
						}

						if (that.sendDataName == getApp().globalData.writeMsg.DRA) {
							that.sendDataName = ''
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SPA)
						}

						if (that.sendDataName == getApp().globalData.writeMsg.DRS) {
							that.sendDataName = ''
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SPS)
						}
						// 	} else {
						// 		if (that.sendDataName == getApp().globalData.writeMsg.IPC) {
						// 			if (result.indexOf('MAC') != -1) {
						// 				uni.showToast({
						// 					title: '查询成功',
						// 					icon: 'success',
						// 					duration: that.duration
						// 				})
						// 			}
						// 			return false
						// 		}
						// 		setTimeout(function() {
						// 			if (result.indexOf(that.sendDataName) != -1) {
						// 				uni.showToast({
						// 					title: '查询成功',
						// 					icon: 'success',
						// 					duration: that.duration
						// 				})
						// 			} else {
						// 				if (that.sendDataName == getApp().globalData.writeMsg.IPC) {
						// 					if (result.indexOf('MAC') != -1) {
						// 						uni.showToast({
						// 							title: '查询成功',
						// 							icon: 'success',
						// 							duration: that.duration
						// 						})
						// 					}
						// 					return false
						// 				}
						// 				uni.showToast({
						// 					title: '查询失败',
						// 					icon: 'error',
						// 					duration: that.duration
						// 				})
						// 			}
						// 		}, 1000)

						if (that.sendDataName == getApp().globalData.writeMsg.WLC) {
							that.sendDataName = ''
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.LIN)
						}

						if (that.sendDataName == getApp().globalData.writeMsg.DRA) {
							that.sendDataName = ''
							EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.SPA)
						}
						// 	}
						// }
					}
				})

				if (that.timer == null && that.selectName != that.NAME.命令扩展) {
					setTimeout(function() {
						if (result == '') {
							uni.showToast({
								title: '查询失败',
								icon: 'error',
								duration: 1500
							})
						}
					}, 2000)
				}
			},

			//设置
			SetData(name) {
				switch (name) {
					case this.NAME.工作模式:

						if (this.activeRadioWorkingMode == '测量模式') {
							var data = getApp().globalData.writeMsg.MOD
							if (this.rSelect[0] == 0) {
								data = data + ',M'
							}
							// else if (this.rSelect[0] == 1) {
							// 	data = data + ',R'
							// } 
							else if (this.rSelect[0] == 1) {
								data = data + ',S'
							} else {
								uni.showToast({
									title: '请选择模式',
									icon: 'none',
									duration: this.duration
								})
								return false;
							}
							this.SetListenMessage()
							// if (this.rSelect1[0] == 0) {
							// 	data = data + ',A'
							// } else if (this.rSelect1[0] == 1) {
							// 	data = data + ',N'
							// }
							this.sendDataName = data // + ";"
							SetwriteBLECharacteristicValue(data)
						} else if (this.activeRadioWorkingMode == '采样间隔') {

							if (this.caiyangjiange == '') {
								uni.showToast({
									title: '请输入参数',
									icon: 'none',
									duration: this.duration
								})
								return false;
							}
							this.SetListenMessage()
							let data = getApp().globalData.writeMsg.GTC + ',' + this.caiyangjiange
							this.sendDataName = data + ";"
							SetwriteBLECharacteristicValue(data)
						}

						break;

					case this.NAME.日期时间:
						this.SetListenMessage()
						let date = new Date(this.date);
						let year = date.getFullYear() + '';
						let month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
						let day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();

						year = year.substring(2, year.length)
						var data = getApp().globalData.writeMsg.RTC + ',' + year + '-' + month + '-' + day + ',' + this
							.timeValue.join(',').replace(new RegExp(',', 'ig'), ':')
						this.sendDataName = data + ";"
						SetwriteBLECharacteristicValue(data)
						break;

					case this.NAME.报文周期:

						if (this.activeRadio == '定时报文') {

							if (this.zibaozhouqi[2].value == '' || this.zibaozhouqi[1]
								.value == '') {
								uni.showToast({
									title: '请输入参数',
									icon: 'none',
									duration: this.duration
								})
								return false;
							}

							this.SetListenMessage()
							
							var data = getApp().globalData.writeMsg.UMC + ',' + JSON.stringify(parseInt(this.zibaozhouqi[2]
								.value) * 3600) + ',' + this.zibaozhouqi[1].value + ',' + this.zibaozhouqi[1].value
							this.sendDataName = data + ";"
							SetwriteBLECharacteristicValue(data)
						} else if (this.activeRadio == '加报报文') {

							if (this.jiabaofazhi[0].value == '' || this.jiabaofazhi[1].value == '' || this.jiabaofazhi[2]
								.value == '') {
								uni.showToast({
									title: '请输入参数',
									icon: 'none',
									duration: this.duration
								})
								return false;
							}
							this.SetListenMessage()
							var data = getApp().globalData.writeMsg.AMT + ',' + this.jiabaofazhi[0].value + ',' + this
								.jiabaofazhi[1].value + ',' + parseFloat((this.jiabaofazhi[2].value)).toFixed(3)
							this.sendDataName = data + ";"
							SetwriteBLECharacteristicValue(data)
						} else if (this.activeRadio == '维持报文') {

							if (this.xintiaojiange == '') {
								uni.showToast({
									title: '请输入参数',
									icon: 'none',
									duration: this.duration
								})
								return false;
							}
							this.SetListenMessage()
							var data = getApp().globalData.writeMsg.BTC + ',' + this.xintiaojiange
							this.sendDataName = data + ";"
							SetwriteBLECharacteristicValue(data)
						}
						break;

					case this.NAME.水位修正:

						console.log(this.shuiweixiuzheng[1].value)
						if (this.shuiweixiuzheng[0].value == '' || this.shuiweixiuzheng[1].value == '') {
							uni.showToast({
								title: '参数不可为空',
								icon: 'error'
							})
						} else {

							this.SetListenMessage()
							var data = getApp().globalData.writeMsg.WLC + ',' + parseFloat(this.shuiweixiuzheng[0].value -
								this.shuiweixiuzheng[1].value).toFixed(3)
							this.sendDataName = data + ";"
							SetwriteBLECharacteristicValue(data)
						}

						break;

					case this.NAME.测井深度:

						if (this.cejingshendu == '') {
							uni.showToast({
								title: '请输入参数',
								icon: 'none',
								duration: this.duration
							})
							return false;
						}

						this.SetListenMessage()
						var data = getApp().globalData.writeMsg.DLV + ',' + parseFloat(this.cejingshendu).toFixed(3)
						this.sendDataName = data + ";"
						SetwriteBLECharacteristicValue(data)
						break;
					case this.NAME.测站高程:

						if (this.cezhangaocheng == '') {
							uni.showToast({
								title: '请输入参数',
								icon: 'none',
								duration: this.duration
							})
							return false;
						}

						this.SetListenMessage()
						var data = getApp().globalData.writeMsg.WLR + ',' + parseFloat(this.cezhangaocheng).toFixed(3)
						this.sendDataName = data + ";"
						SetwriteBLECharacteristicValue(data)
						break;

					case this.NAME.测站编号:

						if (this.cezhanbianhao.length == 10 && parseInt(this.cezhanbianhao.substring(6, 10)) > 0 && this
							.cezhanbianhao.length > 0) {
							this.SetListenMessage()
							var data = getApp().globalData.writeMsg.TSN + ',' + this.cezhanbianhao
							this.sendDataName = data + ";"
							SetwriteBLECharacteristicValue(data)
						} else {
							uni.showToast({
								title: '您输入的编号格式不正确',
								icon: 'error',
								duration: this.duration
							})
						}
						break;

					case this.NAME.通信地址:

						switch (this.activeRadioWired) {
							case '无线网':
								switch (this.lianlubianhao[0]) {
									case 0:

										if (this.onOff1 == [] || this.lianlu1[0].value == '' || this.lianlu1[1].value ==
											'') {
											uni.showToast({
												title: '请输入参数',
												icon: 'none',
												duration: this.duration
											})
											return false;
										}

										data = getApp().globalData.writeMsg.LTE + '1' + ',' + getOnOff(this.onOff1[0]) +
											',' +
											this
											.lianlu1[0].value + ',' + this.lianlu1[1].value + ';' + "$APN1" + "," + this
											.lianlu1[2].value
										break
									case 1:

										if (this.onOff2 == [] || this.lianlu2[0].value == '' || this.lianlu2[1].value ==
											'') {
											uni.showToast({
												title: '请输入参数',
												icon: 'none',
												duration: this.duration
											})
											return false;
										}


										data = getApp().globalData.writeMsg.LTE + '2' + ',' + getOnOff(this.onOff2[0]) +
											',' +
											this
											.lianlu2[0].value + ',' + this.lianlu2[1].value + ';' + "$APN2" + "," + this
											.lianlu2[2].value
										break
									case 2:

										if (this.onOff3 == [] || this.lianlu3[0].value == '' || this.lianlu3[1].value ==
											'') {
											uni.showToast({
												title: '请输入参数',
												icon: 'none',
												duration: this.duration
											})
											return false;
										}


										data = getApp().globalData.writeMsg.LTE + '3' + ',' + getOnOff(this.onOff3[0]) +
											',' +
											this
											.lianlu3[0].value + ',' + this.lianlu3[1].value + ';' + "$APN3" + "," + this
											.lianlu3[2].value
										break
								}
								break
							case '有线网':
								switch (this.lianlubianhaoWired[0]) {
									case 0:

										if (this.onOff1Wired == [] || this.lianlu1Wired[0].value == '' || this
											.lianlu1Wired[1].value == '') {
											uni.showToast({
												title: '请输入参数',
												icon: 'none',
												duration: this.duration
											})
											return false;
										}

										data = getApp().globalData.writeMsg.ETH + '1' + ',' + getOnOff(this.onOff1Wired[
												0]) + ',' +
											this
											.lianlu1Wired[0].value + ',' + this.lianlu1Wired[1].value
										break
									case 1:

										if (this.onOff2Wired == [] || this.lianlu2Wired[0].value == '' || this
											.lianlu2Wired[1].value == '') {
											uni.showToast({
												title: '请输入参数',
												icon: 'none',
												duration: this.duration
											})
											return false;
										}

										data = getApp().globalData.writeMsg.ETH + '2' + ',' + getOnOff(this.onOff2Wired[
												0]) + ',' +
											this
											.lianlu2Wired[0].value + ',' + this.lianlu2Wired[1].value
										break
									case 2:

										if (this.onOff3Wired == [] || this.lianlu3Wired[0].value == '' || this
											.lianlu3Wired[1].value == '') {
											uni.showToast({
												title: '请输入参数',
												icon: 'none',
												duration: this.duration
											})
											return false;
										}

										data = getApp().globalData.writeMsg.ETH + '3' + ',' + getOnOff(this.onOff3Wired[
												0]) + ',' +
											this
											.lianlu3Wired[0].value + ',' + this.lianlu3Wired[1].value
										break
								}
								break
							case '中心站':

								if (this.zhongxinzhanhao[0].value == '' || this.zhongxinzhanhao[1].value == '' || this
									.zhongxinzhanhao[2].value == '') {
									uni.showToast({
										title: '请输入参数',
										icon: 'none',
										duration: this.duration
									})
									return false;
								}

								data = getApp().globalData.writeMsg.CSN + '1' + ',' + this.zhongxinzhanhao[0].value + ';' +
									getApp().globalData.writeMsg.CSN + '2' + ',' + this.zhongxinzhanhao[1].value + ';' +
									getApp().globalData.writeMsg.CSN + '3' + ',' + this.zhongxinzhanhao[2].value
								break
						}
						this.SetListenMessage()
						this.sendDataName = data + ";"
						SetwriteBLECharacteristicValue(data.replaceAll("undefined", ""))

						break;
					case this.NAME.报警检测:

						if (this.kaixiangOff == []) {
							uni.showToast({
								title: '请选择',
								icon: 'none',
								duration: this.duration
							})
							return false;
						}

						this.SetListenMessage()
						var data = getApp().globalData.writeMsg.DRA + ',' + getOnOff(this.kaixiangOff[0])
						this.sendDataName = data + ";"
						SetwriteBLECharacteristicValue(data)
						break;
					case this.NAME.命令扩展:

						if (this.enquiriesMLKZ == '') {
							uni.showToast({
								title: '请输入命令',
								icon: 'none',
								duration: this.duration
							})
							return false;
						}

						this.setMLKZ = ""
						this.EnquiriesListenMessage()
						this.sendDataName = this.enquiriesMLKZ.replace("?", "")
						EnquirieswriteBLECharacteristicValue(this.enquiriesMLKZ.replace("?", ""))
						uni.setStorageSync('MLKZ', this.sendDataName)
						break;
					case this.NAME.测管级联:

						if (this.wangkacanshu[1].value == '' || this.wangkacanshu[2].value == '' || this.wangkacanshu[3]
							.value == '') {
							uni.showToast({
								title: '请输入参数',
								icon: 'none',
								duration: this.duration
							})
							return false;
						}

						this.SetListenMessage()
						var data = getApp().globalData.writeMsg.LIP + ',' + this.wangkacanshu[1].value + ";" + getApp()
							.globalData.writeMsg.SUB + ',' + this.wangkacanshu[2].value + ";" + getApp().globalData
							.writeMsg.GWY + ',' + this.wangkacanshu[3].value
						this.sendDataName = data + ";"
						SetwriteBLECharacteristicValue(data)
						break;
					case this.NAME.水位测值:
						if (this.timer) { //注销定时器
							console.log('注销定时器')
							clearInterval(this.timer)
							this.timer = null;
						}
						this.isPop = false
						break
					default:
						this.isPop = false
						break;
				}
			},

			// 报文周期单选按钮发生改变时触发的方法
			chang(e) {
				this.activeRadio = e.detail.value; //选中按钮的value值
				console.log(this.activeRadio);
			},

			// 通信地址单选按钮发生改变时触发的方法
			changWired(e) {
				this.activeRadioWired = e.detail.value; //选中按钮的value值
				console.log(this.activeRadioWired);
			},

			// 工作模式单选按钮发生改变时触发的方法
			changWorkingMode(e) {
				this.activeRadioWorkingMode = e.detail.value; //选中按钮的value值
				console.log(this.activeRadioWorkingMode);
			},

			tongxinChang(e) {
				this.activeRadioTongxin = e.detail.value; //选中按钮的value值
				console.log(this.activeRadioTongxin);
			},

			//输入框
			inputchange(e, flag) {
				console.log(e.target.value);
			},

			//时间选择变更
			onTimeChange(e) {
				console.log(e)
				this.timeValue = e.detail.value;
			},

			//测量模式单选
			tapInfo(e) {
				this.rSelect = []
				if (this.rSelect.indexOf(e) == -1) {
					this.rSelect.push(e);
				}
			},

			//传输模式单选
			tapInfo1(e) {
				this.rSelect1 = []
				if (this.rSelect1.indexOf(e) == -1) {
					this.rSelect1.push(e);
				}
			},

			//链路编号模式单选
			lianluTapInfo(e) {
				this.lianlubianhao = []
				if (this.lianlubianhao.indexOf(e) == -1) {
					this.lianlubianhao.push(e);
				}
			},

			//链路编号模式单选
			lianluTapInfoWired(e) {
				this.lianlubianhaoWired = []
				if (this.lianlubianhaoWired.indexOf(e) == -1) {
					this.lianlubianhaoWired.push(e);
				}
			},
			//链路编号模式单选
			onOffTapInfo(e, type) {
				switch (type) {
					case '一':
						this.onOff1 = []
						if (this.onOff1.indexOf(e) == -1) {
							this.onOff1.push(e);
						}
						break;
					case '二':
						this.onOff2 = []
						if (this.onOff2.indexOf(e) == -1) {
							this.onOff2.push(e);
						}
						break;
					case '三':
						this.onOff3 = []
						if (this.onOff3.indexOf(e) == -1) {
							this.onOff3.push(e);
						}
						break;
					case '一Wired':
						this.onOff1Wired = []
						if (this.onOff1Wired.indexOf(e) == -1) {
							this.onOff1Wired.push(e);
						}
						break;
					case '二Wired':
						this.onOff2Wired = []
						if (this.onOff2Wired.indexOf(e) == -1) {
							this.onOff2Wired.push(e);
						}
						break;
					case '三Wired':
						this.onOff3Wired = []
						if (this.onOff3Wired.indexOf(e) == -1) {
							this.onOff3Wired.push(e);
						}
						break;
					case '开箱':
						this.kaixiangOff = []
						if (this.kaixiangOff.indexOf(e) == -1) {
							this.kaixiangOff.push(e);
						}
						break;
					case '拆除':
						this.chaichuOff = []
						if (this.chaichuOff.indexOf(e) == -1) {
							this.chaichuOff.push(e);
						}
						break;
					case '有效无效':
						this.status = []
						if (this.status.indexOf(e) == -1) {
							this.status.push(e);
						}
						break;
					default:
						break;
				}
			},


			//窗口关闭
			diamiss() {
				this.isPop = false
				console.log('注销定时器=====', this.timer)
				if (this.timer) { //注销定时器
					console.log('注销定时器')
					clearInterval(this.timer)
					this.timer = null;
				}
			},

			//探头控制
			probeControl(type) {
				this.SetListenMessage()
				switch (type) {
					case 'M':
						this.sendDataName = getApp().globalData.writeMsg.MEA
						SetwriteBLECharacteristicValue(getApp().globalData.writeMsg.MEA + ',S')
						break;
					case 'Z':
						this.sendDataName = getApp().globalData.writeMsg.CRZ
						SetwriteBLECharacteristicValue(getApp().globalData.writeMsg.CRZ)
						break;
					default:
						this.sendDataName = getApp().globalData.writeMsg.MOT
						SetwriteBLECharacteristicValue(getApp().globalData.writeMsg.MOT + ',' + type)
						break
				}
			},


			//控制台功能模块
			onClickItem(item, index) {
				let that = this

				if (getApp().globalData.deviceId == '') {
					uni.showToast({
						title: "请连接蓝牙设备",
						icon: 'error'
					})
					return false
				} else {
					this.isPop = true
					this.selectName = item.name
				}

				switch (item.name) {
					case that.NAME.水位测值:
						break;
					default:
						if (this.timer) { //注销定时器
							console.log('注销定时器')
							clearInterval(this.timer)
							this.timer = null;
						}
						break;
				}
				//	var date = new Date().toISOString(),//现在时间
				switch (item.name) {
					case that.NAME.日期时间:
						let _this = this;
						// setInterval(function() {
						// 	_this.date = Date.parse(new Date());
						// }, 1000);
						_this.timeValue = this.dateFormat(Date.parse(new Date()))
						_this.ymdate = this.dateFormatYMD(_this.date)
						console.log('日期时间', _this.timeValue + '````````````' + _this.ymdate)
						break;
					case that.NAME.水位修正:
						this.EnquiriesListenMessage()
						that.sendDataName = ''
						EnquirieswriteBLECharacteristicValue(getApp().globalData.writeMsg.LIN)
						break;
					case that.NAME.命令扩展:
						that.buttonType = '发送'
						break;
					case that.NAME.水位测值:
					case that.NAME.探头状态:
					case that.NAME.通信状态:
					case that.NAME.信号强度:
					case that.NAME.SIM卡号:
					case that.NAME.电池电压:
					case that.NAME.温湿度值:
					case that.NAME.存储状态:
					case that.NAME.防盗状态:
					case that.NAME.自检周期:
					case that.NAME.固件版本:
					case that.NAME.产品编号:
						that.buttonType = '确认'
						break;
					default:
						that.buttonType = '设置'
						break;
				}

				console.log('点击了宫格：' + index);
				console.log('item' + JSON.stringify(item));
			},


			//设置监听发送过来的消息
			SetListenMessage() {
				let that = this
				let result = ''

				uni.onBLECharacteristicValueChange((res) => {
					let resHex = ab2hex(res.value)
					result = hexCharCodeToStr(resHex).replace(/\ +/g, "").replace(/[ ]/g, "").replace(
						/[\r\n]/g,
						"")

					console.log('设置蓝牙返回的数据', result)

					switch (that.selectName) {
						case that.NAME.水位修正:
							that.shuiweixiuzheng[2].value = result1(result)
							break;
						case that.NAME.通信地址:
							switch (that.activeRadioWired) {
								case '无线网':
									uni.setStorageSync('LTE', result)
									break
								case '有线网':
									uni.setStorageSync('ETH', result)
									break
								case '中心站':
									uni.setStorageSync('CSN', result)
									break
							}
							break
						case that.NAME.测站编号:
							uni.setStorageSync('TSN', result)
							break
							// case that.NAME.命令扩展:
							// 	uni.setStorageSync('MLKZ', result)
							// 	break
					}

					if (that.sendDataName != '') {
						that.sendDataName = that.sendDataName.replaceAll(";$APN1", "").replaceAll(";$APN2", "")
							.replaceAll(";$APN3", "")
						console.log('设置发送：====' + that.sendDataName);
						if (result.indexOf(that.sendDataName) != -1 || result.indexOf(getApp().globalData.writeMsg.UMC + ',' + JSON.stringify(parseInt(this.zibaozhouqi[2].value) * 3600)) != -1) {
							uni.showToast({
								title: '设置成功',
								icon: 'success',
								duration: 1500
							})
							
							
							if (that.sendDataName.indexOf(getApp().globalData.writeMsg.UMC) != -1) {
								this.zibaozhouqi[1].value = result2(result)
							}
							
							if (that.sendDataName.indexOf(getApp().globalData.writeMsg.DRA) != -1) {
								var data = getApp().globalData.writeMsg.SPA + ',' + getOnOff(this
									.chaichuOff[0])
								this.sendDataName = ''
								SetwriteBLECharacteristicValue(data)
							}
						} else {
							// setTimeout(function() {
							// 	if (result.indexOf(that.sendDataName) != -1) {
							// 		uni.showToast({
							// 			title: '设置成功',
							// 			icon: 'success',
							// 			duration: that.duration
							// 		})

							if (that.sendDataName.indexOf(getApp().globalData.writeMsg
									.DRA) != -
								1) {
								var data = getApp().globalData.writeMsg.SPA + ',' +
									getOnOff(this
										.chaichuOff[0])
								this.sendDataName = ''
								SetwriteBLECharacteristicValue(data)
							}

							// 	} else {
							// 		uni.showToast({
							// 			title: '设置失败',
							// 			icon: 'error',
							// 			duration: that.duration
							// 		})
							// 	}
							// }, 1000)
						}
					}
				})

				setTimeout(function() {
					if (result == '') {
						uni.showToast({
							title: '设置失败',
							icon: 'error',
							duration: 1500
						})
					}
				}, 2000)
			},


			dateFormat(time) {
				let date = new Date(time);
				let hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
				let minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
				let seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
				// 拼接
				return (hours + ',' + minutes + ',' + seconds).split(',')
				// return year + "-" + month + "-" + day;
			},


			dateFormatYMD(time) {
				let date = new Date(time);
				let year = date.getFullYear();
				let month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : (date.getMonth() + 1);
				let day = date.getUTCDate() < 10 ? "0" + date.getUTCDate() : date.getUTCDate();
				// 拼接
				return year + '-' + month + '-' + day
				// return year + "-" + month + "-" + day;
			},


			// 监听蓝牙连接状态
			NoticeConnection() {
				var that = this
				uni.onBLEConnectionStateChange((res) => {
					console.log('开始监听蓝牙状态index', res)
					if (!res.connected) {
						console.log('连接已断开index');

						getApp().globalData.deviceName = '暂未连接设备'
						getApp().globalData.deviceId = ''

						Object.assign(that.$data, that.$options.data())

						that.setStorage()
						// clearInterval(_this.data.timer)
					}
				})
			},
		},
	};
</script>




<style lang="scss" scoped>
	.grid-bg {
		display: flex;
		flex-wrap: wrap;
		align-content: flex-start;
		margin-top: 1.8vh
	}

	.grid-item-bg {
		@include grid-column(4);
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		align-content: space-between;
		margin-bottom: 24px;
	}

	.moshi {
		display: flex;
		flex-direction: row;
		margin-top: 25px;
		align-items: center;
	}

	page {
		background: transparent;
	}

	.mask {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		justify-content: center;
		align-items: center;
		background-color: rgba(0, 0, 0, 0.5);
	}

	.content {
		width: 80%;
		border-radius: 20px;
		background-color: white;
		padding-left: 15px;
		padding-top: 10px;
		padding-right: 10px;
		padding-bottom: 10px;
		/* margin-bottom: 140upx; */
		display: flex;
		flex-direction: column;
	}

	.deom-flex {
		display: flex;
		margin-left: 10px;
	}

	.defa {
		width: 60px;
		height: 30px;
		margin-left: 10px;
		border: 1px solid #f4f4f4;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 13px;
	}

	.active {
		width: 60px;
		height: 30px;
		color: white;
		background-color: #2697F9;
	}

	.button {
		height: 40px;
		border-radius: 20px;
		background-color: #2697F9;
		display: flex;
		align-items: center;
		justify-content: center;
		color: white;
		margin-top: 20px;
	}


	$z-index: 100;
	$calendar-size: 630upx;

	.picker {
		position: fixed;
		z-index: $z-index;
		background: rgba(255, 255, 255, 0);
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		font-size: 28upx;

		&-modal {
			background: #fff;
			position: absolute;
			top: 50%;
			left: (750upx - $calendar-size) / 2;
			width: $calendar-size;
			transform: translateY(-50%);
			box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
			border-radius: 12upx;

			&-time {
				width: 100%;
				height: 180px;
				text-align: center;
				line-height: 60upx;
			}
		}
	}

	.view {
		display: flex;
		flex-direction: row;
		margin: 30px 15px 15px 15px;
	}

	.title {
		width: 100px;
		font-size: 15px;
		color: #999999;
		//margin-right: 20px;
		//position: absolute;
	}

	.title1 {
		font-size: 13px;
		color: #999999;
	}

	.title2 {
		font-size: 15px;
		color: #999999;
		position: absolute;
	}

	.input {
		display: flex;
		flex: 1;
		text-align: left;
		color: #999999;
		font-size: 13px;
		-webkit-user-select: auto;
		caret-color: #2697F9;
	}

	.input-center {
		width: 100%;
		justify-content: center;
		align-items: center;
		color: #999999;
		font-size: 13px;
		-webkit-user-select: auto;
		caret-color: #2697F9;
	}

	.input-view {
		display: flex;
		flex: 1;
		text-align: center;
	}

	.radio {
		display: flex;
		flex: 1;
		text-align: center;
		width: 100%;
		justify-content: center;
		align-items: center;
		color: #999999;
		font-size: 13px;
		-webkit-user-select: auto;
		caret-color: #2697F9;
	}
</style>